<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<table class="t_css" width="100%" border="0" cellpadding="0" id="table1" cellspacing="1">
	<tr class="li_2">
		<td   colspan="4" class="t_bar2"><span class="color_red">*</span>基本信息</td>
		
	</tr>
	<tr class="li_1">
		<td   align="right" width="20%">项目名称：</td>
		<td  colspan="3">
			<input id="zh_title" name="proposal/zh_title" label="项目名称" type="text" class="input_css required"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr class="li_2">
		<td   align="right" width="20%">申请类型：</td>
		<td  colspan="3">
			<label> <input type="radio" class="do " id="applay_type_01" style="vertical-align: middle;" name="applay_type" label="贷款贴息" value="01" /><span style="vertical-align: middle;">贷款贴息</span></label> 
			<label> <input type="radio" class="do " id="applay_type_02" style="vertical-align: middle;" name="applay_type" label="无偿拨款" value="02" /><span style="vertical-align: middle;">无偿拨款</span></label> 
			<label> <input type="radio" class="do " id="applay_type_03" style="vertical-align: middle;" name="applay_type" label="后补助" value="03" /><span style="vertical-align: middle;">后补助</span></label>
			<input type="hidden" name="proposal/applay_type_value" id="applay_type_value" class="required" value="<x:out select="$xmlData/data/proposal/applay_type_value" />" label="申请类型" /> 
			<input type="hidden" name="proposal/applay_type_name" id="applay_type_name" value="<x:out select="$xmlData/data/proposal/applay_type_name" />" label="申请类型" /> 
		</td>
	</tr>
	<tr class="li_1">
		<td  align="right" nowrap>申报领域：</td>
		<td colspan="3">
	       <c:set var="statYear">${statYear}</c:set>
			 <c:if test="${empty statYear}">
			<c:set var="statYear"><x:out select="$xmlData/data/proposal/stat_year" /></c:set>
				</c:if>
			 <c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			 <%--
			<c:set var="domain_value"><x:out select="$xmlData/data/proposal/domain_value" /></c:set>
			<cpt:checkbox key="grant_domain" name="domain" repeatColumn="4"  sqlParamVal="{'grant_code':'${grantCode}'}"></cpt:checkbox>
			<input type="hidden" name="proposal/domain_value" class="required"  value="${domain_value}" label="申报领域">
			<input type="hidden" name="proposal/domain_name" value="<x:out select="$xmlData/data/proposal/domain_name" />"> --%>
			
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="domain">{'id':'<x:out select="$xmlData/data/proposal/domain_value" />','name':'<x:out select="$xmlData/data/proposal/domain_name" />'}</c:set>
          	<cpt:tree key="domain1" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${domain}"  label="申报领域"
          		id="domain" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue3" sqlParamVal="{grant_code:	${sub},stat_year:${statYear}}"/>
	        <input id="domain_value" type="hidden" name="proposal/domain_value" class="required" label="申报领域" value="<x:out select="$xmlData/data/proposal/domain_value" />"/>
            <input id="domain_name" type="hidden" name="proposal/domain_name"  value="<x:out select="$xmlData/data/proposal/domain_name" />"/>
	</td>
	</tr>
	<tr class="li_2"> 
	<td align="right" >学科名称：</td>
   <td  colspan="3">
          	<c:set var="subject">{'id':'<x:out select="$xmlData/data/proposal/subject_code" />','name':'<x:out select="$xmlData/data/proposal/subject_name" />'}</c:set>
          	<cpt:tree key="medically" cacheable="false" className="hn_iuput_kuang gray inputWidth1" readonly="true" value="${subject}"  label="学科名称" 
          		id="subject" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue2"/>
	        <input id="subject_code" type="hidden" name="proposal/subject_code" class="required" label="学科名称" value="<x:out select="$xmlData/data/proposal/subject_code" />"/>
            <input id="subject_name" type="hidden" name="proposal/subject_name"  value="<x:out select="$xmlData/data/proposal/subject_name" />"/>
   </td>
	</tr>
	
	<tr class="li_1">
	<td  align="right" nowrap>项目开始时间：</td>
		<td >
			<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className="required date  dateCompare:end_date" label="项目开始时间" ></cpt:date> 
		</td>
		<td  align="right" nowrap>项目结束时间：</td>
		<td>
			<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" className="required date" label="项目结束时间"  value="${end_date}" ></cpt:date> 
		</td>
	</tr>
	<tr class="li_2">
	    <td  align="right" nowrap width="20%">申报日期：</td>
		<td>
			<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date> 
		</td>
		<td align="right">归口管理部门：</td>
		<td colspan="3">
			<c:set var="recomend_org"><x:out select="$xmlData/data/proposal/recomend_org_value" /></c:set>
			<c:set var="sqOrgCode"><x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/></c:set>
			<cpt:select id="recomend_org" sqlParamVal="{currentorgcode:${sqOrgCode }}"  key="proposal_tjbm"  value="${recomend_org}" onChange="initControlValue(this.id);" style="width: 165px;"></cpt:select>
			<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  class="required" value="${recomend_org}" label="归口管理部门">
			<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
		</td>
	</tr>
	<tr class="li_1">
		<td   align="right" width="20%">技术来源：</td>
		<td colspan="3" >
			<label> <input type="radio" class="do " id="tech_source_01" style="vertical-align: middle;" name="tech_source" label="1.自有技术" value="01" /><span style="vertical-align: middle;">1.自有技术</span></label> 
			<label> <input type="radio" class="do " id="tech_source_02" style="vertical-align: middle;" name="tech_source" label="2.合作开发" value="02" /><span style="vertical-align: middle;">2.合作开发</span></label> 
			<label> <input type="radio" class="do " id="tech_source_03" style="vertical-align: middle;" name="tech_source" label="3.引进消化" value="03" /><span style="vertical-align: middle;">3.引进消化</span></label>
			<label> <input type="radio" class="do " id="tech_source_03" style="vertical-align: middle;" name="tech_source" label="4.其他" value="04" /><span style="vertical-align: middle;">4.其他</span></label>
			<input type="hidden" name="proposal/tech_source_value" id="tech_source_value" class="required" value="<x:out select="$xmlData/data/proposal/tech_source_value" />" label="技术来源" /> 
			<input type="hidden" name="proposal/tech_source_name" id="tech_source_name" value="<x:out select="$xmlData/data/proposal/tech_source_name" />" label="技术来源" />
		</td>
		</tr>
		<tr class="li_2">
		<td   align="right" width="20%">项目来源：</td>
		<td colspan="3" >
			<label> <input type="radio" class="do " id="prj_source_01" style="vertical-align: middle;" name="prj_source" label="1.国家级计划" value="01" /><span style="vertical-align: middle;">1.国家级计划</span></label> 
			<label> <input type="radio" class="do " id="prj_source_02" style="vertical-align: middle;" name="prj_source" label="2.省部级计划" value="02" /><span style="vertical-align: middle;">2.省部级计划</span></label> 
			<label> <input type="radio" class="do " id="prj_source_03" style="vertical-align: middle;" name="prj_source" label="3.其他" value="03" /><span style="vertical-align: middle;">3.其他</span></label>
			<input type="hidden" name="proposal/prj_source_value" id="prj_source_value" class="required" value="<x:out select="$xmlData/data/proposal/prj_source_value" />" label="项目来源" /> 
			<input type="hidden" name="proposal/prj_source_name" id="prj_source_name" value="<x:out select="$xmlData/data/proposal/prj_source_name" />" label="项目来源" />
		</td>
		</tr>
	</table>
	<div class="t_bar2"><span class="color_red">*</span>项目完成年指标（万元）</div>
	<table class="t_css" width="100%" border="0" cellpadding="0" id="table2"	cellspacing="1">
		<tr>
			<td   align="right" width="20%">工业总产值：</td>
			<td>
				<input type="text" name="proposal/industry_total_value" label="工业总产值"  type="text" 
				 class="input_css required "  style="width: 70%; text-align: right;"  
				 onfocus="InitInput.setNumber(this,7,4,2)"
				 value="<x:out select="$xmlData/data/proposal/industry_total_value" />"/> 
			</td>
			<td align="right" width="20%">净利润：</td>
			<td>
				<input type="text" name="proposal/profit" label="净利润" type="text" 
				 class="input_css required "  style="width: 70%;text-align: right;" 
				 onfocus="InitInput.setNumber(this,7,4,2)"
				 value="<x:out select="$xmlData/data/proposal/profit" />"/> 
			</td>
		</tr>
		<tr>
			<td align="right" width="20%">工业增加值：</td>
			<td>
				<input type="text" name="proposal/add_value" label="工业增加值" type="text" 
				class="input_css required " style="width: 70%;text-align: right;" 
				onfocus="InitInput.setNumber(this,7,4,2)" 
				value="<x:out select="$xmlData/data/proposal/add_value" />"/>
			</td>
			<td align="right" width="20%">纳税总额：</td>
			<td>
				<input type="text" name="proposal/total_taxes" label="纳税总额" type="text" 
				class="input_css required "  style="width: 70%;text-align: right;" 
				onfocus="InitInput.setNumber(this,7,4,2)"
				value="<x:out select="$xmlData/data/proposal/total_taxes" />"/>
			</td>
		</tr>
		<tr>
			<td align="right" width="20%" nowrap="nowrap">产品销售额：</td>
			<td>
				<input type="text" name="proposal/prj_sell" label="产品销售额" type="text" 
				 class="input_css required "  style="width: 70%;text-align: right;" 
				 onfocus="InitInput.setNumber(this,7,4,2)"
				 value="<x:out select="$xmlData/data/proposal/prj_sell" />"/>
			</td>
			<td align="right" width="20%" nowrap="nowrap">创汇（万美元）：</td>
			<td>
				<input type="text" name="proposal/vat" label="创汇（万美元）" type="text" 
				 class="input_css required "  style="width: 70%;text-align: right;"
				 onfocus="InitInput.setNumber(this,7,4,2)"
				 value="<x:out select="$xmlData/data/proposal/vat" />"/>
			</td>
		</tr>
		<tr>
			<td align="right" width="20%">年生产能力：</td>
			<td>
			   <input type="text" name="proposal/production_capacity" label="年生产能力" type="text" 
				class="input_css required "  style="width: 70%;text-align: right;"
				onfocus="InitInput.setNumber(this,7,4,2)"
				value="<x:out select="$xmlData/data/proposal/production_capacity" />"/>
			</td> 
			<td align="right" width="20%">资产规模：</td>
			<td>
				<input type="text" name="proposal/asset" label="资产规模" type="text" 
				class="input_css required "  style="width: 70%;text-align: right;"
				onfocus="InitInput.setNumber(this,7,4,2)"
				value="<x:out select="$xmlData/data/proposal/asset" />"/>
			</td>
		</tr>
		<tr>
			<td align="right" width="20%">新增就业人数：</td>
			<td colspan="3">
				<input type="text" name="proposal/add_employment" label="新增就业人数" 
				type="text"  class="input_css required "  style="width: 25.5%;text-align: right;" 
				onfocus="InitInput.setNumber(this,7,0,0)"
				value="<x:out select="$xmlData/data/proposal/add_employment" />"/>
			</td>
		</tr>
	</table>
	<div class="t_bar2"><span class="color_red">*</span>质量标准</div>
	<table class="t_css" width="100%" border="0" cellpadding="0" id="table3"	cellspacing="1">
		<tr>
			<td align="right" width="20%">实施单位通过的质量认证体系：</td>
			<td>
				<input name="proposal/certification_system" label="实施单位通过的质量认证体系" type="text" class="input_css required"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/certification_system" />"/> 
			</td>
		</tr>
		<tr>
			<td align="right">项目产品执行的质量标准：</td>
			<td>
				<input name="proposal/quality_standards" label="项目产品执行的质量标准" type="text" class="input_css required"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/quality_standards" />"/>
			</td>
		</tr>
		<tr>
			<td align="right" nowrap>项目通过的国家相关行业许可证：</td>
			<td>
				<input name="proposal/permit" label="项目通过的国家相关行业许可证" type="text" class="input_css required"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/permit" />"/>
			</td>
		</tr>
	</table>
	
	<jsp:include page="../org/prporg_hzdw.jsp">
		<jsp:param value="${param.xmlstr}" name="xmlstr" />
	</jsp:include>
	<%-- <table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org1">
	<tr>
		<td class="t_bar2" colspan="4">合作单位信息</td>
	</tr>
	<tr>
		<td class="t_bar2" colspan="4">合作单位信息1</td>
	</tr>
	<tr>
		<td align="right" width="20%"><span class="color_red" id="color1" style="display:none">*</span>单位名称：</td>
		<td colspan="3">
		<input  name="proposal/org_name1" label="合作单位信息1-->单位名称" type="text"  class="input_css " onchange="cydw('org1');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/org_name1" />"/>
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color2" style="display:none">*</span>单位地址：</td>
		<td colspan="3">
		<input  name="proposal/address1" label="合作单位信息1-->单位地址" type="text"  class="input_css " onchange="cydw('org1');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/address1" />"/>
		</td>
	</tr>
	<tr>
	<td align="right"><span class="color_red" id="color5" style="display:none">*</span>联系人：</td>
	<td><input  name="proposal/lxr_name1" label="合作单位信息1-->联系人" type="text"  class="input_css " onchange="cydw('org1');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_name1" />"/></td>
	<td align="right"><span class="color_red" id="color6" style="display:none">*</span>电话：</td>
	<td><input  name="proposal/lxr_tel1" label="合作单位信息1-->电话" type="text"  class="input_css " onchange="cydw('org1');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_tel1" />"/></td>
	</tr> 
</table>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="org2">
<tr>
		<td    class="t_bar2" colspan="4">合作单位信息2</td>
	</tr>
	<tr>
		<td align="right" width="20%"><span class="color_red" id="color1" style="display:none">*</span>单位名称：</td>
		<td colspan="3">
		<input  name="proposal/org_name2" label="合作单位信息2-->单位名称" type="text" required class="input_css " onchange="cydw('org2');"  style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/org_name2" />"/>
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red" id="color2" style="display:none">*</span>单位地址：</td>
		<td colspan="3">
		<input  name="proposal/address2" label="合作单位信息2-->单位地址" type="text" required class="input_css " onchange="cydw('org2');" style="width: 725px;"  maxlength="100" value="<x:out select="$xmlData/data/proposal/address2" />"/>
		</td>
	</tr>
	<tr>
	<td align="right"><span class="color_red" id="color5" style="display:none">*</span>联系人：</td>
	<td><input  name="proposal/lxr_name2" label="合作单位信息2-->联系人" type="text"  class="input_css "  onchange="cydw('org2');" maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_name2" />"/></td>
	<td align="right"><span class="color_red" id="color6" style="display:none">*</span>电话：</td>
	<td><input  name="proposal/lxr_tel2" label="合作单位信息2-->电话" type="text"  class="input_css " onchange="cydw('org2');"  maxlength="20" value="<x:out select="$xmlData/data/proposal/lxr_tel2" />"/></td>
	</tr>
</table> --%>
 <table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="table4">
	<tr>
		<td    class="t_bar2" colspan="8">人员信息</td>
	</tr>
	<tr>
		<td  align="right"><span class="color_red">*</span>项目联系人：</td>
		<td  >
			<input size="12"  name="proposal/contact_psn_cname" label="项目联系人" type="text" required class="input_css required"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
			<input  name="proposal/contact_psn_tel" label="联系电话" type="text" required class="input_css required"   maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系手机：</td>
		<td  >
			<input  name="proposal/contact_psn_mobile" label="联系手机" type="text" required maxlength="11"  class="input_css required mobile"    value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td  >
			<input  name="proposal/contact_psn_email" label="电子邮箱" type="text" required class="input_css required email"   maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_email" />"/> 
		</td>
	</tr>
	<tr>
		<td  align="right">项目负责人：</td>
		<td>
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		</td>
		<td  align="right">联系电话：</td>
		<td>
		<span name="proposal/fzr_tel" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
		<td  align="right">联系手机：</td>
		<td  >
		<span name="proposal/fzr_mobile" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		<td  align="right">电子邮箱：</td>
		<td>
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
	</tr> 
</table>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="table5">
	<tr>
		<td class="t_bar2"><span class="color_red">*</span>主要开发内容及创新点（限800字）</td>
	</tr>
	<tr class="li_2">
          <td>
			<textarea rows="8" style="width: 98%;" class="input_textarea required  maxlength:800"   name='proposal/goal/summary1'  label="主要开发内容及创新点"><x:out select="$xmlData/data/proposal/goal/summary1"/></textarea>
		   <input type='hidden' name='proposal/goal/summary1_hidden' id='proposal/goal/summary1_hidden' value='<x:out select="$xmlData/data/proposal/goal/summary1_hidden"/>'>
		  </td>
      </tr>
</table>
<div class="t_bar2"><span class="color_red">*</span>技术指标</div>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="table6">
	<!-- <tr>
		<td class="t_bar2">技术指标（限500字）</td>
	</tr> -->
	<tr>
		<td><strong>项目产品主要性能指标</strong>（限500字）：</td>
	</tr>
	<tr class="li_2">
      <td>
			<textarea rows="8" style="width: 98%;" class="input_textarea required  maxlength:500"   name='proposal/goal/summary2'  label="技术指标-->项目产品主要性能指标"><x:out select="$xmlData/data/proposal/goal/summary2"/></textarea>
		   <input type='hidden' name='proposal/goal/summary2_hidden' id='proposal/goal/summary2_hidden' value='<x:out select="$xmlData/data/proposal/goal/summary2_hidden"/>'>
		</td>
   </tr>
</table> 
<script type="text/javascript">

function cydw(id){
	var count =0 ;
	$("#"+id).find("input[type='text']").each(function(){
		if($.trim($(this).val()) != ''){
			count +=1;
		}
	});
	if(count != 0){
		$("#"+id).find("input[type='text']").each(function(){
			$(this).addClass("required");
		});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','');
		});
	}else{
		$("#"+id).find("input[type='text']").each(function(){
			$(this).removeClass("required");
	});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','none');
		});
	}
}

function setProjectPlace(op){
	var address = $("#address_value").val();
	if(op) address = '${address}';
	$("#address_name_other").removeClass("required");
	if(address == '02'){
		$("#address_name_other_span").show();
		$("#address_name_other").css("display","");
		$("#address_name_other").addClass("required");
	}else{
		$("#address_name_other_span").hide();
		$("#address_name_other").removeClass("required");
		$("#address_name_other").val("");
	}
}
function initTreeValue2CallBack(){
	cydw('org1');
	cydw('org2');
}
function setEmptyValueForTree(id){
	$("#"+id).val("");
	$("#"+id+"_hideId").val("");
	$("#"+id+"_hideName").val("");
	$("#"+id+"_code").val("");
	$("#"+id+"_value").val("");
	$("#"+id+"_name").val("");
	$("#"+id + ",[name$='/"+id+"_code']" + ",[name$='/"+id+"_name'],[name$='/"+id+"_value']").val("");
	$("#sqdm").val("");
	cydw('org1');
	cydw('org2');
}

</script>

